import requests

# 目标url
url = 'https://www.baidu.com'
# 向目标url发送get请求
response = requests.get(url)
# 设置响应内容的编码格式，解决中文乱码的问题
response.encoding = 'utf-8'
# 打印响应的内容
print(response.text)